/**
 * 
 */
package com.scpii.universal.hibernate.dao.impl;

import org.springframework.stereotype.Repository;

import com.scpii.universal.hibernate.dao.ManageUserDao;
import com.scpii.universal.hibernate.entity.ManageUserTab;

/**
 * genericWeb
 * @author weny
 * 2012-7-6上午10:58:48
 */
@Repository
public class ManageUserDaoImpl extends BaseDaoImpl<ManageUserTab, Integer> implements
		ManageUserDao {

	@Override
	public ManageUserTab getUserInfoById(Long userId, String[] properties) {
		String hql = generateHqlByProperties(properties)
				+ "where entity.intUserId=?";
		return (ManageUserTab) getHibernateTemplate().getSessionFactory()
				.getCurrentSession().createQuery(hql).setParameter(0, userId)
				.uniqueResult();
	}

}
